<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
  <style>
    html, body {
      padding: 0;
      margin: 0;
    }
    #container {
      width: 800px;
      height: 600px;
    }

    #block {
      width: 100px;
      height: 100px;
      background: green;
      border: solid 10px;
      position: absolute;
      left: 0;
      box-sizing: border-box;
    }  
  </style>
</head>
<body>
  <div id="block"></div>
  <canvas id="container" width="800" height="600"></canvas>
  <script src="/js/sprite-core.js"></script>
  <script>
    const {Layer, Sprite} = spritejs,
      context = document.getElementById('container').getContext('2d');

    const layer = new Layer({context});

    const s1 = new Sprite();
    s1.attr({
      size: [100, 100],
      pos: [0, 300],
      bgcolor: 'red',
      border: [10, 'blue'],
      boxSizing: 'border-box',
    });

    layer.append(s1);
  </script>
</body>
</html>